package cn.wolfcode.wolf2w.strategy.config;

import cn.wolfcode.wolf2w.common.security.config.WebMvcConfig;
import cn.wolfcode.wolf2w.strategy.util.UserInfoArgumentResolver;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.List;

@Configuration
public class WebMVCConfig implements WebMvcConfigurer {
  @Autowired
    private UserInfoArgumentResolver userInfoArgumentResolver;

  //参数解析器


  @Override
  public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) {
    resolvers.add(userInfoArgumentResolver);
  }
}
